package com.huarui.partner.action;

import java.util.HashMap;
import java.util.Map;

import org.ewaf.framework.action.BaseAction;

import com.huarui.partner.model.Partner;
import com.huarui.partner.service.PartnerService;

/**
 * 
 * @author ycf
 *
 */
public class PartnerCheckAction extends BaseAction{

	public static final String MESS = "mess";
	
	private static final long serialVersionUID = -7498875376921721985L;

	private Integer companyId;
	
	private Map<String, Object> mesMap;
	
	private PartnerService partnerService;

	public void setPartnerService(PartnerService partnerService) {
		this.partnerService = partnerService;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Map<String, Object> getMesMap() {
		return mesMap;
	}

	public void setMesMap(Map<String, Object> mesMap) {
		this.mesMap = mesMap;
	}
	
	/**
	 * 检查是否存在
	 * @return
	 */
	
	public String checkPartner() {
		if(companyId == null) {
			mesMap = new HashMap<String, Object>();
		} else {
			mesMap = partnerService.checkPartnerMes(companyId);
		}
		
		return MESS;
	}
	
}
